package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by mac on 2017/11/21.
 */
public class Test {

    public static void main(String[] args) {

        while(true){

            Scanner scanner = new Scanner(System.in);

            double area = 0;
            double radius = 0;

            try {
                System.out.println("请输入半径;");
                radius = scanner.nextDouble();
                area = radius * radius * 3.14;
                System.out.println(area);
            }catch (InputMismatchException e){
                System.out.println("输入类型不匹配！！！");
            }
        }
    }
}
